package com.kede.ienum;

import com.baomidou.mybatisplus.annotation.EnumValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

/***
 ** @Author:Pr.li
 ** @Description: 商品分销: 0=不开启,1=开启
 ** @Date: create in 2023/5/15 22:48
 ***/
@Getter
@AllArgsConstructor
public enum FenxiaoStatusEnum {
    OFF(0,"不开启",1),
        ON(1,"开启",2);

    @EnumValue
    private Integer code;
    private String value;
    private Integer enumIndex;

    public static FenxiaoStatusEnum parse(Integer code) {
        for (FenxiaoStatusEnum value : values()) {
            if (value.code.equals(code)) {
                return value;
            }
        }
        return null;
    }
}
